# these next few lines import some of the WMP functions we will
# use in this file.
from frontend.roleApplication import RoleApplication
from frontend.form import Type
from unique import UNIQUE;

class PlaceOrderApplication(RoleApplication):
    def __init__(self):
        super(PlaceOrderApplication, self).__init__("Foodler"+UNIQUE, "Foodler") 
        self.register_source_step("PlaceOrder", self.take_order_form_creator) 

    def take_order_form_creator(self, stepname, form):
        form.add_static_label("Order Info:");
        form.add_field(Type.SHORTSTRING, "Customer Name", labeltext="Name", initial="");
        form.add_field(Type.SHORTSTRING, "Restaurant", labeltext="Restaurant", initial="");
        form.add_field(Type.SHORTSTRING, "Food", labeltext="Food", initial="");
        form.add_field(Type.SHORTSTRING, "Quantity", labeltext="Quantity", initial="");

if __name__ == '__main__':
    #starts up the OrderTakerApplication:
    app = PlaceOrderApplication()
    #Start interacting with the user:
    app.MainLoop()